public class NutritionFacts_JavaBeans_Pattern{
  //parametrii sunt initializati la valorile initiale (daca exista)
  private int servingSize = -1; //Necesar; fara valoare initiala
  private int servings = -1;    //-----------//-------------
  private int calories = 0;
  private int fat = 0;
  private int sodium = 0;
  private int carbohydrate = 0;

public void NutritionFacts_JavaBeans_Pattern(){}

//seteri
  public void setServingSize(int val) {servingSize = val;}
  public void setServings(int val) {servings = val;}
  public void setCalories(int val) {fat = val;}
  public void setSodium(int val) {sodium = val;}
  public void setCarbohydrate(int val) {carbohydrate = val;}
 }
